|
|
|
|
|
|
|
LISTING 17.6. THEdepositMETHOD OF THEDepositFundsCLASS. |
|
|
|
 |
|
|
|
|
1: Public Sub Deposit()
2: On Error GoTo depositErr
3:
4: 'your code goes here...
5: If theSomeWorkgroupProxy.CurrProcess.isCurrTaskComplete Then
6: theApplication.theAppTransactions.addTrans2MemLog
Deposited funds
7: theTransactionProcessor.theTransaction.TellerID =
theUser.UserID
8: theTransactionProcessor.theTransaction.TransID = DEPOSITFUNDS
9: theTransactionProcessor.theTransaction.DateTimeStamp = Now
10: TransactionGroup.Add theTransactionProcessor.
theTransaction.TellerID, _
11: theTransactionProcessor.theTransaction.TransID, _
12: theTransactionProcessor.theTransaction.DateTimeStamp
13: End If
14: Exit Sub
15: depositErr:
16: Call RaiseError(MyUnhandledError, DepositFunds:deposit
Method)
17: End Sub |
|
|
|
|
|
|
|
|
Finally, Listing 17.7 shows the code for the withdraw method of the withdrawFunds class. You can find the code in this chapter on the CD-ROM in the \Day17 folder. |
|
|
|
|
|
|
|
|
LISTING 17.7. THEwithdrawMETHOD OF THEwithdrawFundsCLASS. |
|
|
|
 |
|
|
|
|
1: Public Sub withdraw()
2: On Error GoTo withdrawErr
3:
4: 'your code goes here...
5:
6: If theSomeWorkgroupProxy.CurrProcess.isCurrTaskComplete Then
7: theApplication.theAppTransactions.addTrans2MemLog
Withdrew funds
8: theTransactionProcessor.theTransaction.TellerID =
theUser.UserID
9: theTransactionProcessor.theTransaction.TransID =
WITHDRAWFUNDS
10: theTransactionProcessor.theTransaction.DateTimeStamp =
Now
11: TransactionGroup.Add theTransactionProcessor.
theTransaction.TellerID, _
|
|
|
|
|
|